-
Notifications
You must be signed in to change notification settings - Fork 205
SG-38306 Python2 Removal - Part 4 - Mimetypes module #401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ticket/SG-38306-python2-removal-cleanup-imports
Are you sure you want to change the base?
SG-38306 Python2 Removal - Part 4 - Mimetypes module #401
Conversation
9850464
to
6e89b98
Compare
33e5200
to
c4d1e30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request removes the deprecated Python 2.7 copy of the mimetypes module as part of the Python 2 removal effort. The codebase now exclusively uses Python's default mimetypes module since there are no longer any known issues with it after the transition away from Python 2.
Key changes:
- Removes the bundled Python 2.7 mimetypes module that was used to work around Windows-specific bugs in Python 2.7.0-2.7.9
- Simplifies the mimetypes import logic to directly import the standard library module
- Removes associated test code that was validating the conditional import behavior
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
shotgun_api3/lib/mimetypes.py | Complete removal of the bundled Python 2.7 mimetypes module (598 lines deleted) |
shotgun_api3/shotgun.py | Simplifies mimetypes import by removing conditional logic and directly importing standard library module |
tests/test_unit.py | Removes test class and import for the deprecated mimetypes fix functionality |
shotgun_api3/lib/README.md | Removes documentation section explaining the bundled mimetypes module and associated Python 2.7 Windows bugs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Remove now deprecated copy of Python 2.7's mimetypes module.
We prefer to use Python's default mimetypes module instead since we are not aware of any issues with this module anymore.
PR orders